package com.job.Gai_Yian.Homework0715;

import java.util.Scanner;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-15 16:16:12
 */
public class StringEx03 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int sum=sc.nextInt();
        for (int i=10000;i<=999999;i++){
            if (isPalindrome(i,sum)){
                System.out.println(i+"是回文数字");
            }
        }
    }
    public static boolean isPalindrome(int number, int sum) {
        String str = String.valueOf(number);
        char[] num01 = str.toCharArray();
        char[] num02 = new char[str.length()];
        for (int j = 0; j <str.length(); j++) {
            if (str.charAt(j)!=str.charAt(str.length()-j-1)){
                return false;
            }else{
                return true;
            }
        }
        return true;
    }
}




